package com.crealth.crmserver;


import com.crealth.handler.ClientMsgHandler;
import com.crealth.handler.RequestMsgQueue;
import com.crealth.handler.ResponseMsgQueue;
import com.crealth.msg.NetMessageData;

public class RequestMsgThread2 extends CommonThread {
	//private static Logger logger = Logger.getLogger("running_log");

	@Override
	public void execute() throws Exception {
		NetMessageData revData = RequestMsgQueue.getRequestMsg();
		if (revData == null) {
			return;
		}
		int userID = revData.getUserID();
		int cmd = revData.getMsgCmd();
		//logger.info("RequestMsgThread2 handler userID: " + userID + "  cmd: "+cmd);
		NetMessageData resData = ClientMsgHandler.msgHandler(revData);
		if (resData == null) {
			return;
		}
		resData.setUserID(userID);
		if (resData != null) {
			resData.setMsgCmd(cmd);
			ResponseMsgQueue.addMsgToQueue(resData);
		}
		
	}
	
	
}
